package com.avit.tv.kui.base;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.avit.tv.kui.dialog.DialogController;
import com.avit.tv.kui.toast.AvitToast;

/**
 * @author like
 * @date 2020/6/29
 */
public abstract class BaseActivity extends AppCompatActivity {

    protected DialogController dialogController;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        dialogController = DialogController.getInstance().init(this).registerDialogEvent(this);
        AvitToast.makeToast().init(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        DialogController.getInstance().unRegisterDialogEvent();
    }
}
